4.8.3 查询用户目录详情

基本信息

Path: /api/v1/userDirectory/query

Method: GET

接口描述:

请求参数

Query

根据id查询

参数名称 是否必须 示例 备注
id 必须 用户目录id

根据name查询

参数名称 是否必须 示例 备注
name 必须 用户目录name
  1. 如果响应状态码为401且控制台【审计中心/设备安全日志】中存在接口攻击行为日志,处置原因为[SNORT]SNORT ACTION: BLOCK。说明是设备检测到了请求中存在攻击特征,触发了自动拦截。请检查name参数中是否存在SQL或命令注入特征,如select、delete等关键字,如果存在请修改用户目录名后重试。如需协助,可联系深信服客户服务热线:400-630-6430。

返回数据

名称 类型 是否必须 默认值 备注 其他信息
code number 必须 错误码,非0标识失败
data object 必须 返回数据主体
├─ data object 必须 数据
├─├─ id string 必须 用户目录ID
├─├─ name string 必须 用户目录名称
├─├─ type string 必须 用户目录类型,'ldap', 'local', 'wechat', 'custom'
├─├─ authComposeId string 必须 用户目录默认的认证策略ID
├─├─ authComposeName string 必须 用户目录默认的认证策略名
├─├─ domain string 必须 用户目录的域
├─├─ mappingOptions object 必须 用户灵活字段映射配置
├─├─ config object 必须 用户目录配置
├─├─ description string 非必须 描述
msg string 非必须 code对应的提示信息  

返回示例

{
    "code": 0,
    "data": {
        "data": {
            "id": "c1085980-a3da-11eb-ab69-8353f1c26be3",
            "name": "idldap-test",
            "description": "",
            "domain": "idldap-test.com",
            "authComposeId": "c109e020-a3da-11eb-ab69-8353f1c26be3",
            "authComposeName": "默认策略",
            "type": "ldap",
            "config": {
                "type": "ldap",
                "ignoreCase": 0,
                "syncConfig": {
                    "hadSync": true,
                    "pageSize": 200,
                    "syncTime": {
                        "period": 86400000
                    },
                    "cleanDeleted": {
                        "enable": 1,
                        "interval": 168
                    }
                },
                "templateId": "14c280a1-5eac-46e6-8e82-f0fed48f0583",
                "interfaceStatus": 1,
                "externalUserServerConfig": {
                    "type": "ad",
                    "serverIp": "1.1.1.1",
                    "directory": {
                        "type": "ldap",
                        "subtype": "default"
                    },
                    "bandFilter": "(|(objectclass=groupOfUniqueNames)|(objectclass=groupOfNames)|(objectclass=posixGroup))",
                    "reqTimeout": "15",
                    "userFilter": "(objectclass=person)",
                    "groupFilter": "(ou=*)",
                    "adminAccount": "cn=Manager,dc=mloupen,dc=com",
                    "adminPassword": "♂♀☺♪♫◙♂1",
                    "serverAddress": "ldaps://1.1.1.1",
                    "searchEntrance": "ou=openldapgroupA,dc=mloupen,dc=com",
                    "serverProtocol": "ldaps://",
                    "bandAttrMapping": {
                        "name": "cn",
                        "externalId": "entryUUID",
                        "description": "description"
                    },
                    "interfaceStatus": 1,
                    "userAttrMapping": {
                        "band": "memberOf",
                        "name": "uid",
                        "path": "ou",
                        "email": "mail",
                        "phone": "telephoneNumber",
                        "status": "",
                        "externalId": "entryUUID",
                        "description": "description",
                        "displayName": "displayName",
                        "expiredTime": ""
                    },
                    "groupAttrMapping": {
                        "name": "ou",
                        "externalId": "entryUUID",
                        "description": "description"
                    }
                },
                "unImportedUserAuthOption": {
                    "behavior": "default"
                },
                "forbidUnimportedUserLogin": 1
            },
            "mappingOptions": [{
                "label": "用户名(default)",
                "value": "name"
            }, {
                "label": "显示名(default)",
                "value": "displayName"
            }, {
                "label": "描述(default)",
                "value": "description"
            }, {
                "label": "手机号码(default)",
                "value": "phone"
            }, {
                "label": "电子邮箱(default)",
                "value": "email"
            }, {
                "label": "外部ID(default)",
                "value": "externalId"
            }]
        }
    },
    "msg": "请求成功"
}

错误信息

错误提示 错误码
参数检查出错 10000001
用户目录不存在 77200001
深信服科技 all right reserved,powered by Gitbook本文档更新于: 2024-11-20 11:03

results matching ""

    No results matching ""